home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
COM
/
MacPPP Control 1.5b2.sit
/
MacPPP Control 1.5b2
/
Check Emailer
< prev
next >
Wrap
Text File
|
1996-03-01
|
3KB
|
93 lines
(* Check Emailer 0.9 -> Friday, March 1, 1996
Who did it
----------
Jonathan Rentzsch (jonathan@u-s-x.com)
<http://www.u-s-x.com>
Copyright ゥ 1996 United Software Express, all rights reserved.
Based loosely on Mark Alldritt's "Check The Mail" AppleScript which
does the same thing for Eudora
I would call this Version 1.0, but I'm not completely confident in it. Please
forward any bug reports. Besides that, the stigma!
What it needs
-------------
MacPPP Ctrl 1.1 or later
Emailer 1.0v2 or later (get the upgrade, for God's sake, it's free)
What it does
------------
Launches Emailer
If PPP is not active, attempts to activate
Sends and retrieves all mail for your Internet (TCP-accessable) account(s)
If PPP was not active when the script began, PPP is closed. Otherwise PPP is left up.
(This handy when you are already online and you want to blast all your mail)
What YOU need to do
-------------------
Scroll down to "--> Your Account" and change "jonathan@u-s-x.com" to your
"Account Name." Note: Your email address in not necessary your account name!
Go into Emailer and figure out what your "Account Name" is and use that.
Scroll down to "--> Fast Mac?." If you have errors saying "PPP connection timed out"
then try replacing the "repeat while ( i < 100 ..." with "repeat while ( i < 200 ...".
Of course, so completely deserve this hassle since you can afford that 9500.
If you have multiple accounts, scroll down to "--> Your Account" and duplicate the line
"connect to "jonathan@u-s-x.com" with sending and checking". Now replace the
"jonathan@u-s-x.com" account name with your next account name. Repeat with how many
accounts you have. I once had eight different accounts, so this ability is a God-send.
Write and say how you owe me big time for writing this for you.
*)
try
-- Launch Emailer before acivating PPP - saves us that time once we're online
tell application "Emailer" to activate
--remember the PPP state before proceeding
copy (PPPopened) to wasOpened
--if PPP is not active, activate it
if not wasOpened then
activate
openPPP
set i to 0
--> Fast Mac?
repeat while (i < 100 and not (PPPopened))
set i to i + 1
end repeat
if not (PPPopened) then error "PPP connection timed out"
end if
--the PPP is active, blast the mail both ways
with timeout of 9999 seconds
tell application "Emailer"
activate
--> Your Account
connect to "jonathan@u-s-x.com" with sending and checking
end tell
end timeout
-- if PPP was not active when we started, kill it now
if not wasOpened then
repeat 5 times
activate
end repeat
closePPP
end if
on error err
--uh-oh. Bad stuff happened.
activate
--if PPP is active because we turned it on, offer to turn it off.
if (PPPopened) and (not wasOpened) then
display dialog "Can't check the mail (" & err & ")." & return & return & ツ
"Close PPP connection?" buttons {"Close", "Don't Close"} default button "Close" with icon caution
if the button returned of the result is "Close" then
repeat 5 times
activate
end repeat
closePPP
end if
else
--otherwise just tell them the bad news
display dialog "Can't check the mail (" & err & ")." buttons "OK" default button "OK" with icon caution
end if
end try